<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="./template.xhtml">

    <ui:define name="head">
		<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
	</ui:define>
    
    <ui:define name="title">
        GMap - <span class="subitem">Polygons</span>
    </ui:define>

    <ui:define name="description">
        Any number of polygons can be displayed on map. Polygons can also respond to selection by via overlaySelect behavior.
    </ui:define>

    <ui:param name="documentationLink" value="/components/gmap" />

    <ui:define name="implementation">

        <h:form prependId="false">	
            <p:growl id="growl" life="3000" showDetail="true" />

            <p:gmap id="gmap" center="36.890257,30.707417" zoom="13" type="HYBRID" style="width:100%;height:400px" model="#{polygonsView.polygonModel}">
                <p:ajax event="overlaySelect" listener="#{polygonsView.onPolygonSelect}" update="growl" />
            </p:gmap>
        </h:form>
        
    </ui:define>

</ui:composition>
